<template>
  <view class="pay-setting">
    <scroll-view scroll-y class="scroll-container">
      <view class="pay-item">
        <view class="item-title">普通员工</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">业务员、员工</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">底薪 + 提成</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">底薪工资</view>
          <view class="salary-value">2400</view>
          <view class="salary-unit">月份: 5.5倍</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">提成（%）</view>
          <view class="salary-value">3%</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>

      <view class="pay-item">
        <view class="item-title">中介社长</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">业务员、员工</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">底薪 + 提成</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">底薪工资</view>
          <view class="salary-value">2400</view>
          <view class="salary-unit">月份: 5.5倍</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">提成比例</view>
          <view class="salary-value">组内提成（第1个月）：客户成交额的3%-5%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第2个月）：客户成交额的2%-3%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第3个月）：客户成交额的1%-2%</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>

      <view class="pay-item">
        <view class="item-title">驻场客服</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">业务员、客服</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">300/天</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">工作时间</view>
          <view class="salary-value">早9：00-下午6：00</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>

      <view class="pay-item">
        <view class="item-title">小时工</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">临时工</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">20/小时</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>

      <view class="pay-item">
        <view class="item-title">驻点销售</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">业务员</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">300/天</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">提成比例</view>
          <view class="salary-value">组内提成（第1个月）：客户成交额的3%-5%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第2个月）：客户成交额的2%-3%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第3个月）：客户成交额的1%-2%</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>

      <view class="pay-item">
        <view class="item-title">小时工</view>
        <view class="job-row">
          <view class="job-label">公司职位</view>
          <view class="job-value">临时工</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">薪资形式</view>
          <view class="salary-value">20/小时</view>
        </view>
        <view class="salary-row">
          <view class="salary-label">提成比例</view>
          <view class="salary-value">组内提成（第1个月）：客户成交额的3%-5%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第2个月）：客户成交额的2%-3%</view>
        </view>
        <view class="salary-row">
          <view class="salary-label"></view>
          <view class="salary-value">组内提成（第3个月）：客户成交额的1%-2%</view>
        </view>
        <view class="btn-group">
          <view class="edit-btn">编辑</view>
          <view class="del-btn">删除</view>
        </view>
      </view>
    </scroll-view>
    
    <view class="fixed-bottom">
      <view class="add-btn" @click="addFun">添加薪酬</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      
    }
  },
  methods: {
    addFun(){
      uni.navigateTo({
        url: '/pages/staging/salarySetting',
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.pay-setting {
  background-color: #f6f7fb;
  min-height: 100vh;
  position: relative;
  
  .scroll-container {
    padding: 20rpx 30rpx;
    padding-bottom: 150rpx;
    box-sizing: border-box;
    height: 100vh;
  }
  
  .pay-item {
    background-color: #ffffff;
    border-radius: 8rpx;
    padding: 30rpx;
    margin-bottom: 20rpx;
    
    .item-title {
      font-size: 32rpx;
      font-weight: bold;
      color: #333;
      margin-bottom: 20rpx;
    }
    
    .job-row, .salary-row {
      display: flex;
      margin-bottom: 15rpx;
      font-size: 28rpx;
      
      .job-label, .salary-label {
        width: 160rpx;
        color: #666;
      }
      
      .job-value, .salary-value {
        flex: 1;
        color: #333;
      }
      
      .salary-unit {
        color: #666;
        margin-left: 20rpx;
      }
    }
    
    .btn-group {
      display: flex;
      justify-content: flex-end;
      margin-top: 30rpx;
      
      .edit-btn, .del-btn {
        width: 120rpx;
        height: 60rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28rpx;
        border-radius: 6rpx;
      }
      
      .edit-btn {
        background-color: #f2f7ff;
        color: #3A92FF;
        margin-right: 20rpx;
      }
      
      .del-btn {
        background-color: #ffeeee;
        color: #ff5a5a;
      }
    }
  }
  
  .fixed-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    padding: 20rpx 30rpx;
    box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
    
    .add-btn {
      height: 90rpx;
      background-color: #3A92FF;
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 32rpx;
      border-radius: 8rpx;
    }
  }
}
</style> 